package com.cloudkinto.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_cost")
public class CostDo extends Model<CostDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * oms单据号
     */
    @TableField("order_no")
    private String orderNo;

    @TableField("order_id")
    private Long orderId;

    /**
     * 0实扣 1预扣
     */
    @TableField("status")
    private Integer status;

    /**
     * 业务类型 10 入库 20 出库 30仓租 40工单
     */
    @TableField("module_type")
    private Integer moduleType;

    /**
     * 单据类型
     * 101 一件代发入库
     * 201 备货中转入库
     * 301 退件
     * 401 一件代发出库
     * 501 备转中出库
     * 1001
     */
    @TableField("order_type")
    private String orderType;

    /**
     * 费用单据号
     */
    @TableField("cost_no")
    private String costNo;

    /**
     * 仓库
     */
    @TableField("wh_id")
    private Long whId;

    /**
     * 客户id
     */
    @TableField("company_id")
    private Long companyId;

    /**
     * 总金额
     */
    @TableField("cost_total")
    private BigDecimal costTotal;

    /**
     * 币种
     */
    @TableField("currency_code")
    private String currencyCode;

    /**
     * 报价方案id
     */
    @TableField("quotation_id")
    private Long quotationId;

    @TableField("tenant_id")
    private Long tenantId;

    /**
     * 手动调整
     */
    @TableField("manual_adjust")
    private Boolean manualAdjust;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    /**
     * 计费状态 1未计费 2已计费
     */
    @TableField("cost_status")
    private Integer costStatus;

    /**
     * 计费时间
     */
    @TableField("cost_time")
    private Date costTime;

    @TableField("cost_by")
    private Long costBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    /**
     * oms创建时间
     */
    @TableField("oms_order_create_time")
    private Date omsOrderCreateTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
